package comp353Games;

/**
 * SnortDisplay is a container for the graphical representation of Snort.
 * 
 * @author Andre Harvey, Deanna Fink, Tyler Radley
 * @version February 13, 2012
 */

//imported packages
import javax.swing.*;
import java.awt.*;

/**
 * A Swing container that renders a graphical representation of a Snort game.
 */
public class Display extends JPanel{

    //instance variables
    

    
    /**
     * An array of arrays containing the nodes in the game
     */
    private int[][] gameBoard;
    

    /**
     * Class constructor.
     *
     * @param game      The Snort instance this will display.
     */
    public Display(Game game) {  
        super(new BorderLayout());
        this.setOpaque(true);
    }
    
    
    /**
     * Returns the preferred size for this display.
     *
     * @return  A Dimension object representing the smallest size needed to nicely display this game.
     */
    @Override
    public Dimension getPreferredSize() {
        int width = 300 + 30*this.gameBoard.length;
        int height = 200 + 40*this.gameBoard.length;
        return new Dimension(width, height);
    }
    
   
}